package vn.edu.ptithcm.pim.service;

import vn.edu.ptithcm.pim.dom.Customer;

import java.util.List;

import vn.edu.ptithcm.pim.dao.CustomerDao;
import vn.edu.ptithcm.pim.query.CustomerQuery;

@SuppressWarnings({ "rawtypes" })
public class CustomerService {
	private CustomerDao customerDao;

	public CustomerDao getCustomerDao() {
		return customerDao;
	}

	public void setCustomerDao(CustomerDao customerDao) {
		this.customerDao = customerDao;
	}

	public void save(Customer customer) {
		customerDao.save(customer);
	}

	public void saveOrUpdate(Customer customer) {
		customerDao.saveOrUpdate(customer);
	}

	public void lock(Customer customer) {
		customerDao.lock(customer);
	}

	public void delete(Customer customer) {
		customerDao.delete(customer);
	}

	public Customer merge(Customer customer) {
		return customerDao.merge(customer);
	}

	public Customer findById(java.lang.Long id) {
		return customerDao.findById(id);
	}

	public List findByExample(Customer customer) {
		return customerDao.findByExample(customer);
	}

	public List getAll() {
		return customerDao.getAll();
	}

	public void deleteById(java.lang.Long id) {
		customerDao.deleteById(id);
	}

	public List<Customer> findByQuery(CustomerQuery query, int max, int offset) {
		return customerDao.findByQuery(query, max, offset);
	}

	public int countByQuery(CustomerQuery query) {
		return customerDao.countByQuery(query);
	}
}
